package app.qrcode.browser.chat.model.db

import android.content.Context
import android.database.sqlite.SQLiteDatabase
import android.database.sqlite.SQLiteOpenHelper
import android.util.Log
import app.qrcode.browser.chat.model.dao.ContactTable
import app.qrcode.browser.chat.model.dao.InviteTable
import app.qrcode.browser.chat.model.dao.UserAccountTable

/**
 * Created by DomenCai on 2022/3/12.
 */
class DBHelper(val context: Context, name: String?, version: Int) :
    SQLiteOpenHelper(context, name, null, version) {
    override fun onCreate(db: SQLiteDatabase?) {
        db?.execSQL(ContactTable.CREATE_TAB)
        db?.execSQL(InviteTable.CREATE_TAB)
        Log.w("cdm", "UserAccountDB.onCreate -> 建表成功")
    }

    override fun onUpgrade(db: SQLiteDatabase?, oldVersion: Int, newVersion: Int) {
    }
}